<form id="form" action="{:url('popupshop/adwords/edit')}">
<input type="hidden" name="id" value="{$info.id}"/>
<input type="hidden" name="picture" value="{$info.picture}" id="picture" />
<input type="hidden" name="group_id" value="{$info.group_id}" />
<table class="formtable"> 
    <tr>
        <th>打开方式:</th>
        <td>
            <select datatype="*" class="select w300" name="open_type">
                <option value="navigate"{if $info.open_type =='navigate'} selected{/if}>navigate [保留并跳转到新页面]</option>
                <option value="redirect"{if $info.open_type =='redirect'} selected{/if}>redirect [关闭并跳转到新页面]</option>
                <option value="switchTab"{if $info.open_type =='switchTab'} selected{/if}>switchTab [关闭并跳转TabBar页面]</option>
            </select>
            <span class="gray">仅支持微信小程序端</span>
        </td>
    </tr>
    <tr><th>广告标题:</th><td><input class="input w500" datatype="*" type="text" name="title" value="{$info.title}" /></td></tr>
    <tr><th>广告地址(url):</th><td><input class="input w500" datatype="*" ignore="ignore" type="text" name="link" value="{$info.link|dehtml}" /></td></tr>
    <tr class="imgs"><th><input type="button" value="选择广告图" class="button button-blank select_img" /></th><td class="review"><img src="{$info.picture}"></td></tr>  
    <tr>
        <th></th>
        <td>
            <input type="submit" value="确定" class="button button-blue submit" />
            <input type="reset" value="重置" class="button button-blank"/>
        </td>
    </tr>
</table>
</div>
</form>
<script type="text/javascript">
Do('base','layer','form', function () {
    $('#form').isForm();
    $(".select_img").click(function(){openwin('{:url("system/passport.common/upload")}')}); 
})
//添加图片
function setImg(show_src){
    $("#picture").val(show_src);
    $(".review").html('<img src="'+show_src+'">');  
}
</script>